home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / OEMNSVSP.IN_ / oemnsvsp.inf
INI File  |  1996-07-12  |  15KB  |  427 lines

  1. [Identification]
  2.     OptionType = NetService
  3. [Options]
  4.     STCPIP
  5. [FileConstants]
  6. Manufacturer    = "Microsoft"
  7. ProductMajorVersion     = "4"
  8. ProductMinorVersion     = "0"
  9. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  10. ProductOpSupport     = 132 
  11. ProductSTCPIPName        = "SimpTcp"
  12. ProductSTCPIPImagePath   = "%SystemRoot%\system32\tcpsvcs.exe"
  13. ProductSTCPIPSvcType     = "autoserviceshare"
  14. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(Product$(Option)Name)"\CurrentVersion"
  15. [GeneralConstants]
  16. UtilityInf       = "UTILITY.INF"
  17. subroutineinf    = "SUBROUTN.INF"
  18. Exit_Code        = 0
  19. BillboardVisible = 0
  20. from      = ""
  21. to        = ""
  22. ExitCodeOk     = 0
  23. ExitCodeCancel = 1
  24. ExitCodeFatal  = 2
  25. KeyNull         = ""
  26. MAXIMUM_ALLOWED   = 33554432
  27. SERVICE_NO_CHANGE = 4294967295
  28. RegistryErrorIndex = NO_ERROR
  29. KeyProduct      = ""
  30. KeyParameters   = ""
  31. TRUE            = 1
  32. FALSE           = 0
  33. NoTitle         = 0
  34. ExitState   = "Active"
  35. OldVersionExisted = $(FALSE)
  36. [date]
  37.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  38. [Identify]
  39.     read-syms Identification
  40.     set Status     = STATUS_SUCCESSFUL
  41.     set Identifier = $(OptionType)
  42.     set Media      = #("Source Media Descriptions", 1, 1)
  43.     Return $(Status) $(Identifier) $(Media)
  44. [ReturnOptions]
  45.     set Status        = STATUS_FAILED
  46.     set OptionList     = {}
  47.     set OptionTextList = {}
  48.     set LanguageList = ^(LanguagesSupported, 1)
  49.     Ifcontains(i) $($0) in $(LanguageList)
  50.         goto returnoptions
  51.     else
  52.         set Status = STATUS_NOLANGUAGE
  53.         goto finish_ReturnOptions
  54.     endif
  55. returnoptions = +
  56.     set OptionList     = ^(Options, 1)
  57.     set OptionTextList = ^(OptionsText$($0), 1)
  58.     set Status         = STATUS_SUCCESSFUL
  59. finish_ReturnOptions = +
  60.     Return $(Status) $(OptionList) $(OptionTextList)
  61. [InstallOption]
  62.     set Option   = $($1)
  63.     set SrcDir   = $($2)
  64.     set AddCopy  = $($3)
  65.     set DoCopy   = $($4)
  66.     set DoConfig = $($5)
  67.     set LanguageList = ^(LanguagesSupported, 1)
  68.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  69.         Return STATUS_NOLANGUAGE
  70.     endif
  71.     Debug-Output "OEMNSVCU.INF: STF_CWDIR is: "$(!STF_CWDIR)
  72.     Debug-Output "OEMNSVCU.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  73.     set-subst LF = "\n"
  74.     read-syms GeneralConstants
  75.     read-syms FileConstants
  76.     read-syms DialogConstants$(!STF_LANGUAGE)
  77.     ifstr(i) $(!NTN_Origination) == "NCPA"
  78.         set Continue = $(OK)
  79.     endif
  80.     read-syms FileConstants$(!STF_LANGUAGE)
  81.     detect date
  82.     set-title  $(FunctionTitle)
  83.     set to   = Begin
  84.     set from = Begin
  85.     set CommonStatus = STATUS_SUCCESSFUL
  86.     EndWait
  87. Begin = +
  88.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  89.         set OEM_ABANDON_SOFTWARE = {"STCPIP"}
  90.         set StartLabel = removeadapter
  91.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  92.         set StartLabel = UpgradeSoftware
  93.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  94.         set StartLabel = configureadapter
  95.         Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  96.             Debug-Output "Cannot configure the software."
  97.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  98.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  99.                 Debug-Output "ShellCode error: cannot get an error string."
  100.                 goto ShellCodeError
  101.             endif
  102.             set Error = $($R0)
  103.             set from = end
  104.             set to = end
  105.             goto nonfatalinfo
  106.         endif
  107.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  108.         set StartLabel = bindingadapter
  109.     else
  110.         set StartLabel = installadapter
  111.         set OEM_ABANDON_SOFTWARE = {}
  112.         set OEM_ABANDON_OPTIONS = {}
  113.     endif
  114.     set from = $(fatal)
  115.     set to = $(fatal)
  116.     goto $(StartLabel)
  117. installadapter = +
  118.     Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  119.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  120.        Goto ShellCodeError
  121.     Else-Ifstr(i) $($R0) == STATUS_FAILED
  122.        Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  123.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  124.            goto ShellCodeError
  125.        endif
  126.        set Error = $($R0)
  127.        Goto fatal
  128.     Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  129.        Goto successful
  130.     Endif
  131.     Set SrcDir = $($R1)
  132.     ifstr(i) $(!NTN_InstallMode) == "install"
  133.         Debug-Output "OEMNSVCU.INF: installadapter: installing [Install-Option]"
  134.         install "Install-Option"
  135.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  136.            Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  137.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  138.                goto ShellCodeError
  139.            endif
  140.            set Error = $($R0)
  141.            goto fatal
  142.         endif
  143.     endif
  144.     set OEM_ABANDON_ON  = TRUE
  145.     StartWait
  146.     set ThisOption = STCPIP
  147.     Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer),+
  148.         $(Product$(ThisOption)Name),+
  149.         $(Product$(ThisOption)Name),+
  150.         $(Product$(ThisOption)DisplayName),+
  151.         $(STF_CONTEXTINFNAME),+
  152.         $(Product$(ThisOption)ImagePath),+
  153.         $(Product$(ThisOption)SvcType), "",+
  154.         {"Afd","+TDI"}, "", "%systemroot%\system32\simptcp.dll"
  155.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  156.         Debug-Output "OEMNSVSP.INF: ShellCode error"
  157.         goto ShellCodeError
  158.     endif
  159.     set RegistryErrorIndex = $($R0)
  160.     CloseRegKey $($R3)
  161.     CloseRegKey $($R5)
  162.     set STParamKey = $($R4)
  163.     set STVerKey   = $($R1)
  164.     set STRulesKey   = $($R2)
  165.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  166.         EndWait
  167.         Debug-Output "OEMNSVSP.INF: Registry error creating Simple TCP/IP service"
  168.         CloseRegKey $(STParamKey)
  169.         CloseRegKey $(STVerKey)
  170.         CloseRegKey $(STRulesKey)
  171.         goto fatalregistry
  172.     endif
  173.     set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),"Transport"},+
  174.                        {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  175.                        {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  176.                        {Title,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Title)},+
  177.                        {Description,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Description)},+
  178.                        {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Name)},+
  179.                        {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}, +
  180.                        {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  181.     Shell  $(UtilityInf), AddValueList, $(STVerKey), $(NewValueList)
  182.     CloseRegKey $(STVerKey)
  183.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  184.         Debug-Output "OEMNSVSP.INF: ShellCode error, add value list"
  185.         CloseRegKey $(STParamKey)
  186.         goto ShellCodeError
  187.     endif
  188.     set RegistryErrorIndex = $($R0)
  189.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  190.         EndWait
  191.         Debug-Output "OEMNSVSP.INF: Registry error: add value list."
  192.         CloseRegKey $(STParamKey)
  193.         CloseRegKey $(STRulesKey)
  194.         goto fatalregistry
  195.     Endif
  196.     set NewValueList = {{InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}}
  197.     Shell  $(UtilityInf), AddValueList, $(STRulesKey), $(NewValueList)
  198.     CloseRegKey $(STRulesKey)
  199.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  200.         Debug-Output "OEMNSVSP.INF: ShellCode error, add value list"
  201.         CloseRegKey $(STParamKey)
  202.         goto ShellCodeError
  203.     endif
  204.     set RegistryErrorIndex = $($R0)
  205.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  206.         EndWait
  207.         Debug-Output "OEMNSVSP.INF: Registry error: add value list."
  208.         CloseRegKey $(STParamKey)
  209.         goto fatalregistry
  210.     Endif
  211.     set NewValueList = {+
  212.                        {EnableMultipleThreads,$(NoTitle),$(!REG_VT_DWORD),1},+
  213.                        {EnableTcpEcho,$(NoTitle),$(!REG_VT_DWORD),1},+
  214.                        {EnableUdpEcho,$(NoTitle),$(!REG_VT_DWORD),1},+
  215.                        {EnableTcpDiscard,$(NoTitle),$(!REG_VT_DWORD),1},+
  216.                        {EnableUdpDiscard,$(NoTitle),$(!REG_VT_DWORD),1},+
  217.                        {EnableTcpChargen,$(NoTitle),$(!REG_VT_DWORD),1},+
  218.                        {EnableUdpChargen,$(NoTitle),$(!REG_VT_DWORD),1},+
  219.                        {EnableTcpDaytime,$(NoTitle),$(!REG_VT_DWORD),1},+
  220.                        {EnableUdpDaytime,$(NoTitle),$(!REG_VT_DWORD),1},+
  221.                        {EnableTcpQotd,$(NoTitle),$(!REG_VT_DWORD),1},+
  222.                        {EnableUdpQotd,$(NoTitle),$(!REG_VT_DWORD),1},+
  223.                        {QotdFileName,$(NoTitle),$(!REG_VT_EXPAND_SZ),"%SystemRoot%\system32\drivers\etc\quotes"},+
  224.                        {MaxTcpClients,$(NoTitle),$(!REG_VT_DWORD),16},+
  225.                        {MaxIdleTicks,$(NoTitle),$(!REG_VT_DWORD),600000},+
  226.                        {SelectTimeout,$(NoTitle),$(!REG_VT_DWORD),300},+
  227.                        {IoBufferSize,$(NoTitle),$(!REG_VT_DWORD),8192}}
  228.     Shell  $(UtilityInf), AddValueList, $(STParamKey), $(NewValueList)
  229.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  230.         Debug-Output "OEMNSVSP.INF: ShellCode error, add value list"
  231.         CloseRegKey $(STParamKey)
  232.         goto ShellCodeError
  233.     endif
  234.     CloseRegKey $(STParamKey)
  235.     set RegistryErrorIndex = $($R0)
  236.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  237.         EndWait
  238.         Debug-Output "OEMNSVSP.INF: Registry error: add value list."
  239.         goto fatalregistry
  240.     Endif
  241.     EndWait
  242.     Shell $(UtilityInf) SetMasterComponent Microsoft Tcpip $(STF_CONTEXTINFNAME) STCPIP
  243.     goto successful
  244. configureadapter = +
  245.     goto end
  246. bindingadapter =+
  247.     goto end
  248. removeadapter = +
  249.     ForListDo  $(OEM_ABANDON_SOFTWARE)
  250.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), $(Product$($)Name)
  251.     EndForListDo
  252.     goto end
  253. UpgradeSoftware = +
  254.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  255.     Ifstr $(KeyProduct) != $(KeyNull)
  256.         install "Install-Update"
  257.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  258.             goto fatal
  259.         endif
  260.         SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  261.         SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  262.         SetRegValue $(KeyProduct) {Description,$(NoTitle),$(!REG_VT_SZ),$(Product$(Option)Description)}
  263.         SetRegValue $(KeyProduct) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}
  264.         CloseRegKey $(KeyProduct)
  265.     else
  266.         goto fatalregistry
  267.     endif
  268.     goto end
  269. successful = +
  270.     goto end
  271. infomsg =+
  272.    read-syms InfoDlg
  273.    ui start "Warning"
  274.    set CommonStatus = STATUS_USERCANCEL
  275.    goto end
  276. warning = +
  277.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  278.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  279.         goto ShellCodeError
  280.     endif
  281.     ifstr(i) $($R1) == "OK"
  282.         goto $(to)
  283.     else-ifstr(i) $($R1) == "CANCEL"
  284.         goto $(from)
  285.     else
  286.         goto "end"
  287.     endif
  288. nonfatalinfo = +
  289.     Set CommonStatus = STATUS_USERCANCEL
  290.     Set Severity = STATUS
  291.     goto nonfatalmsg
  292. nonfatal = +
  293.     Set Severity = NONFATAL
  294.     goto nonfatalmsg
  295. nonfatalmsg = +
  296.     ifstr(i) $(Error) == ""
  297.         Set Severity = NONFATAL
  298.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  299.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  300.             goto ShellCodeError
  301.         endif
  302.         set Error = $($R0)
  303.     endif
  304.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  305.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  306.         goto ShellCodeError
  307.     endif
  308.     ifstr(i) $($R1) == "OK"
  309.         goto $(from)
  310.     else
  311.         goto "end"
  312.     endif
  313. fatalregistry = +
  314.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  315.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  316.         goto ShellCodeError
  317.     endif
  318.     set Error = $($R0)
  319.     goto fatal
  320. fatal = +
  321.     ifstr(i) $(Error) == ""
  322.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  323.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  324.             goto ShellCodeError
  325.         endif
  326.         set Error = $($R0)
  327.     endif
  328.     Ifint $(BillboardVisible) != 0
  329.         Shell "subroutn.inf" PopBillboard
  330.         Set BillboardVisible = 0
  331.     Endif
  332.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  333.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  334.         goto ShellCodeError
  335.     endif
  336.    goto setfailed
  337. ShellCodeError = +
  338.     set DlgType      = "MessageBox"
  339.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  340.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  341.     set STF_MB_TYPE  = 1
  342.     set STF_MB_ICON  = 3
  343.     set STF_MB_DEF   = 1
  344.     ui start "Error Message"
  345.     goto setfailed
  346. setfailed = +
  347.     set CommonStatus = STATUS_FAILED
  348.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  349.         set OEM_ABANDON_ON = FALSE
  350.         goto removeadapter
  351.     endif
  352.     goto end
  353. end = +
  354.     goto term
  355. term = +
  356.     Return $(CommonStatus)
  357. [GetFilesSize]
  358.     set FileSizeList = >(^(Files-STCPIP,3),*(^(Files-ETC,3),1))
  359.     set TotalSize = 0
  360.     ForListDo $(FileSizeList)
  361.         Split-String $($) "=" SplitString
  362.         set Size = *($(SplitString),3)
  363.         set-add TotalSize = $(TotalSize) $(Size)
  364.     EndForListDo
  365.     set-div SizeInK = $(TotalSize) 1024
  366.     ifint $(SizeInK) == 0
  367.         set SizeInK = 1
  368.     endif
  369.     return $(SizeInK)
  370. [Install-Option]
  371.     set STF_VITAL = ""
  372.     ifstr(i) $(AddCopy) == "YES"
  373.         AddSectionFilesToCopyList Files-STCPIP $(SrcDir) $(!STF_WINDOWSSYSPATH)
  374.         AddSectionFilesToCopyList Files-ETC $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers\etc
  375.     endif
  376.     ifstr(i) $(DoCopy) == "YES"
  377.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  378.        CopyFilesInCopyList
  379.     endif
  380.     ifstr(i) $(DoConfig) == "YES"
  381.     endif
  382.     Exit
  383. [Install-Update]
  384.    set STF_VITAL        = ""
  385.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  386.    AddSectionFilesToCopyList Files-STCPIP $(SrcDir) $(!STF_WINDOWSSYSPATH)
  387.    AddSectionFilesToCopyList Files-ETC $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers\etc
  388.    Exit
  389. [Source Media Descriptions]
  390.     1 = "Windows NT Server CD-ROM", TAGFILE = cdrom_s.40
  391. [Signature]
  392.     FileType = MICROSOFT_FILE
  393. [GetSignature]
  394.     read-syms Signature
  395.     return $(FileType)
  396. [ProductType]
  397. STF_PRODUCT  = LanmanNT
  398. STF_PLATFORM = I386
  399. [Files-Inf]
  400. 2,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  401. [Files-ETC]
  402. 1,QUOTES , SIZE=999
  403. [Files-STCPIP]
  404. 1, SIMPTCP.DLL, SIZE=999
  405. [LanguagesSupported]
  406.     ENG
  407. [DialogConstantsENG]
  408. Help        = "&Help"
  409. Exit        = "Cancel"
  410. OK          = "OK"
  411. HelpContext = ""
  412. Continue    = "Continue"
  413. Cancel      = "Cancel"
  414. [FileConstantsENG]
  415. ProCaption   = "Windows NT Setup"
  416. ProCancel    = "Cancel"
  417. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  418.                "Are you sure you want to cancel copying files?"
  419. ProCancelCap = "Network Setup Message"
  420. ProText1     = "Copying:"
  421. ProText2     = "To:"
  422. ProductSTCPIPDisplayName        = "Simple TCP/IP Services"
  423. ProductSTCPIPTitle              = "Simple TCP/IP Services"
  424. ProductSTCPIPDescription        = "Client programs for simple network protocols, including Character Generator, Daytime, Echo and Quote of the Day."
  425. [OptionsTextENG]
  426.     STCPIP = "Simple TCP/IP Services"
  427.